//
//  PrivacyTreatyView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/29.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "PrivacyTreatyView.h"
#import "SYRequestAPI+Wode.h"

@implementation PrivacyTreatyView

- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
        [self layout];
    }
    return self;
}
- (void)initSubView{
    self.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.navView];
    [self getYingSiTiaoKuanRequest];
    
}
- (void)layout{
    [_navView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@0);
        make.right.equalTo(@0);
        make.top.equalTo(@0);
        make.height.equalTo(@44);
    }];
}
- (ZXFDCCVNav *)navView{
    if (!_navView) {
        ZXFDCCVNav *view = [[ZXFDCCVNav alloc]init];
        view.backgroundColor = [UIColor whiteColor];
        view.delegate = self;
        view.titleLabe.text = @"隐私条款";
        _navView = view;
    }
    return _navView;
}
- (void)backClick{
    [UIView animateWithDuration:0.5 animations:^{
        self.frame = CGRectMake(self.frame.size.width, 0, self.frame.size.width, self.frame.size.height);
    } completion:^(BOOL finished) {
        [self removeFromSuperview];
    }];
    
}
#pragma mark - 获得隐私条款
- (void)getYingSiTiaoKuanRequest{
    [SYRequestAPI sy_getSafeServiceAgreement:@{} success:^(id  _Nonnull responseObject) {
        NSLog(@"得到隐私条款的请求 %@",responseObject);
    } fail:^(NSError *error) {
        
    }];
}
@end
